package com.dog.basics.api.controller.mtkj;


import com.dog.basics.bean.vo.api.mtkj.ApiLockPassVo;
import com.dog.basics.bean.vo.api.mtkj.ApiLockVo;
import com.dog.basics.common.constant.SwaggerConstants;
import com.dog.basics.common.util.R;
import com.dog.basics.service.mtkj.IMtDeviceLockPassService;
import com.dog.basics.service.mtkj.IMtDeviceLockService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 设备锁通道表 前端控制器
 * </p>
 *
 * @author wph
 * @since 2020-09-30
 */
@RestController
@RequestMapping("/api/device/lock/pass")
@Api(value = "设备锁通道模块", tags = SwaggerConstants.API_ALL)
@AllArgsConstructor
public class MtDeviceLockPassController {

    private final IMtDeviceLockPassService mtDeviceLockPassService;

    /**
     * @Description: 设备锁详情
     * @Param: id
     * @return: ApiLockVo
     * @Author: wph
     * @Date:
     */
    @ApiOperation(value = "设备锁通道详情", notes = "设备锁通道详情", tags = SwaggerConstants.API_SAO)
    @ApiImplicitParam(value = "设备锁通道ID", name = "id", dataType = "Long", required = true)
    @GetMapping("/getApiObjXq/{id}")
    public R<ApiLockPassVo> getApiObjXq(@PathVariable("id") Long id) {
        return R.ok(mtDeviceLockPassService.getApiObjXq(id));
    }
}